#!/usr/bin/perl
#
# Check one email.
# Mainly test tool for IsEmail
#

use strict;

use IsEmail;
use Getopt::Long;
    
use vars qw($DEBUG);
$DEBUG = 0;

GetOptions("debug" => \$DEBUG,
    "timeout=i" => \$IsEmail::timeout);

if ($DEBUG) {
    $IsEmail::DEBUG = 1;
}


my $addr;
for $addr (@ARGV) {
    my ($res, $level, $why) = IsEmail::checkemail($addr);
    print IsEmail::resultname($res), " $level: ", $why, "\n";
}
